package classByGZMZ.day02;

/**
 * @Author zsj
 * @Version 1.0
 * @Date 2024/3/5 15:54
 * @Description
 */
public class Doctor extends Person {
    private String sex;
    private String room;
    private String subject;

    public Doctor(String name, int age, String sex, String room, String subject) {
        super(name, age);
        this.sex = sex;
        this.room = room;
        this.subject = subject;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getRoom() {
        return room;
    }

    public void setRoom(String room) {
        this.room = room;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    @Override
    public void job() {
        System.out.println("医生" + getRoom() + ":" + getName() + ":" + getSex() + ",年龄" + getAge() + "," + getSubject());
    }
}
